// //添加员工信息
// function addEmployeeData(id, name, sex, department, post, phone, remarks) {
//     staff.push({ id, name, sex, department, post, phone, remarks });
// }
//删除员工信息
function delEmployeeData(id) {
    try {//捕获异常
        for (let i = 0; i < staff.length; i++) {
            if (staff[i].id == id) {
                staff.splice(i, 1);
                break;
            }
        }
        return true;
    } catch (e) {
        return false;
    }
}